<!DOCTYPE html>
<html lang="zh" dir="auto">

<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>[译]特性 | PaperMod</title>

<meta name="keywords" content="PaperMod" />
<meta name="description" content="了解 PaperMod 的所有功能">
<meta name="author" content="Aditya Telange">
<link rel="canonical" href="https://note.ftls.xyz/papermod/posts/papermod/papermod-features/" />
<link href="/papermod/assets/css/stylesheet.min.746a86b58bb2b052b5e4df8216510494f04f81e62c08d626150c26c69ca929da.css" integrity="sha256-dGqGtYuysFK15N&#43;CFlEElPBPgeYsCNYmFQwmxpypKdo=" rel="preload stylesheet"
    as="style">

<link rel="icon" href="https://note.ftls.xyz/papermod/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="https://note.ftls.xyz/papermod/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://note.ftls.xyz/papermod/favicon-32x32.png">
<link rel="apple-touch-icon" href="https://note.ftls.xyz/papermod/apple-touch-icon.png">
<link rel="mask-icon" href="https://note.ftls.xyz/papermod/safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<meta name="generator" content="Hugo 0.104.2" />
<link rel="alternate" hreflang="zh" href="https://note.ftls.xyz/papermod/posts/papermod/papermod-features/" />
<link rel="alternate" hreflang="en" href="https://note.ftls.xyz/papermod/en/posts/papermod/papermod-features/" />


<meta property="og:title" content="[译]特性" />
<meta property="og:description" content="了解 PaperMod 的所有功能" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://note.ftls.xyz/papermod/posts/papermod/papermod-features/" /><meta property="og:image" content="https://note.ftls.xyz/papermod/%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mod-cover.png"/><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2021-01-20T00:00:00&#43;00:00" />
<meta property="article:modified_time" content="2021-01-20T00:00:00&#43;00:00" />

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://note.ftls.xyz/papermod/%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mod-cover.png"/>

<meta name="twitter:title" content="[译]特性"/>
<meta name="twitter:description" content="了解 PaperMod 的所有功能"/>


<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position":  1 ,
      "name": "Posts",
      "item": "https://note.ftls.xyz/papermod/posts/"
    }, 
    {
      "@type": "ListItem",
      "position":  2 ,
      "name": "PaperMod",
      "item": "https://note.ftls.xyz/papermod/posts/papermod/"
    }, 
    {
      "@type": "ListItem",
      "position":  3 ,
      "name": "[译]特性",
      "item": "https://note.ftls.xyz/papermod/posts/papermod/papermod-features/"
    }
  ]
}
</script>
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "[译]特性",
  "name": "[译]特性",
  "description": "了解 PaperMod 的所有功能",
  "keywords": [
    "PaperMod"
  ],
  "articleBody": " 转载自: https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/\n介绍 我们将在下面的所有示例中使用 yml/yaml 格式，我建议使用 yml 而不是 toml，因为它更易于阅读。\n如果你需要，你可以找 YML to TOML 这类转换器。\nAssets (js/css) 以下是默认启用的\nminification - makes the assets size smallest as possible. bundling - bundles all the styles in one single asset fingerprint/integrity check. 默认主题亮/暗/自动 params: # defaultTheme: light # defaultTheme: dark defaultTheme: auto # to switch between dark or light according to browser theme 主题切换切换（默认启用） 在页面标题之外显示图标以更改主题\n禁用方法：\ndisableThemeToggle: true 您可以参考下表以更好地理解…\ndefaultTheme disableThemeToggle checks local storage? checks system theme? Info auto true No Yes only system theme false Yes (if not-\u003e2) Yes (2) switch present dark true No No force dark only false Yes No switch present light true No No force light only false Yes No switch present 归档布局 Archives Layout 在content目录中创建一个带有archive.md的页面，内容如下\n. ├── config.yml ├── content/ │ ├── archives.md \u003c--- Create archive.md here │ └── posts/ ├── static/ └── themes/ └── PaperMod/ 并添加以下内容\n--- title: \"Archive\" layout: \"archives\" url: \"/archives/\" summary: archives --- 注意： Archives Layout不支持多语言月份翻译。\n如: archives.md\n主页模式 Regular Mode (default-mode) 主页模式 Home-Info Mode 使用第一个条目作为一些显示信息\n将以下内容添加到配置文件中\nparams: homeInfoParams: Title: Hi there wave Content: Can be Info, links, about... socialIcons: # optional - name: \"\" url: \"\" - name: \"\" url: \"\" 如. config.yml#L106\n主页模式 Profile Mode 将索引/主页显示为带有社交链接和图像的整页\n将以下内容添加到配置文件中\nparams: profileMode: enabled: true title: \"\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# optional default will be site title\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003esubtitle\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"This is subtitle\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eimageUrl\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003cimage link\u003e\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# optional\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eimageTitle\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003ctitle of image as alt\u003e\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# optional\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eimageWidth\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e120\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# custom size\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eimageHeight\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e120\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# custom size\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ebuttons\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#f92672\"\u003ename\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003eArchive\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eurl\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"/archive\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#f92672\"\u003ename\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003eGithub\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eurl\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"https://github.com/\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003esocialIcons\u003c/span\u003e: \u003cspan style=\"color:#75715e\"\u003e# optional\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#f92672\"\u003ename\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003cplatform\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eurl\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003clink\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#f92672\"\u003ename\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003cplatform 2\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eurl\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003clink2\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"搜索页-search-page\"\u003e搜索页 Search Page\u003c/h3\u003e \u003cp\u003ePaperMod 使用\u003ca href=\"https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds\"\u003eFuse.js Basic\u003c/a\u003e for seach functionality\n\u003cp\u003e将以下内容添加到站点配置，\u003ccode\u003econfig.yml\u003c/code\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eoutputs\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ehome\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eHTML\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eRSS\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eJSON\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# is necessary\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e在\u003ccode\u003econtent\u003c/code\u003e目录下创建一个带有\u003ccode\u003esearch.md\u003c/code\u003e的页面，内容如下\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003etitle\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"Search\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# in any language you want\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003elayout\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"search\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# is necessary\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# url: \"/archive\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# description: \"Description for Search\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003esummary\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"search\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e要隐藏特定页面不被搜索，请将其添加到帖子的前面\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003esearchHidden\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e如: \u003ca href=\"https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md\"\u003esearch.md\u003c/a\u003e\n\u003cblockquote\u003e \u003cp\u003e搜索页面也有键绑定：\n\u003cul\u003e \u003cli\u003e向上/向下移动列表的箭头键\u003c/li\u003e \u003cli\u003eEnter 键（返回）或右箭头键转到突出显示的页面\u003c/li\u003e \u003cli\u003e清除搜索框和结果的退出键\u003c/li\u003e \u003c/ul\u003e \u003c/blockquote\u003e \u003cp\u003e对于多语言使用 \u003ccode\u003esearch.\u003clang\u003e.md\u003c/code\u003e 例如。 \u003ccode\u003esearch.es.md\u003c/code\u003e。\n\u003cp\u003e\u003cstrong\u003e注意：\u003c/strong\u003e 搜索仅适用于当前语言，用户当前使用的语言 !\n\u003cp\u003e\u003cstrong\u003e自定义 Fusejs 选项\u003c/strong\u003e\n\u003cp\u003e有关选项，请参阅 \u003ca href=\"https://fusejs.io/api/options.html\"\u003ehttps://fusejs.io/api/options.html\u003c/a\u003e，添加如下所示的选项。\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003efuseOpts\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eisCaseSensitive\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003efalse\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eshouldSort\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003elocation\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003edistance\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e1000\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ethreshold\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e0.4\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eminMatchCharLength\u003c/span\u003e: \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ekeys\u003c/span\u003e: [\u003cspan style=\"color:#e6db74\"\u003e\"title\"\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\"permalink\"\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\"summary\"\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\"content\"\u003c/span\u003e] \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"draft-page-indication\"\u003eDraft Page indication\u003c/h3\u003e \u003cp\u003e添加\u003ccode\u003e[draft]\u003c/code\u003e 标记以指示草稿页面。\n\u003chr\u003e \u003ch3 id=\"文章封面\"\u003e文章封面\u003c/h3\u003e \u003cp\u003e在帖子的页面变量中添加：\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003ecover\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eimage\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003cimage path/url\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#75715e\"\u003e# can also paste direct link from external site\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#75715e\"\u003e# ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ealt\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003calt text\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecaption\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"\u003ctext\u003e\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003erelative\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003efalse\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# To use relative path for cover image, used in hugo Page-bundles\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e当您在 \u003ca href=\"https://gohugo.io/content-management/page-bundles/\"\u003ePage Bundle\u003c/a\u003e 中包含图像时，将使用 HTML5 \u003ccode\u003esrcset\u003c/code\u003e 字段自动提供多种尺寸的图像。\n\u003cp\u003e为了减少站点的生成时间和大小，您可以使用禁用此功能\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecover\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eresponsiveImages\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003efalse\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e要在帖子页面上启用指向完整图像大小的超链接，请使用\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecover\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003elinkFullImages\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"文章分享按钮\"\u003e文章分享按钮\u003c/h3\u003e \u003cp\u003e在每个帖子的底部显示分享按钮\n\u003cp\u003e要显示共享按钮添加\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eShowShareButtons\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"显示文章阅读时间\"\u003e显示文章阅读时间\u003c/h3\u003e \u003cp\u003e显示阅读时间（阅读内容所需的估计时间，以分钟为单位。）\n\u003cp\u003e要显示阅读时间添加\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eParams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eShowReadingTime\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"在博客文章中显示目录-toc\"\u003e在博客文章中显示目录 (Toc)\u003c/h3\u003e \u003cp\u003e在博客页面上显示 ToC\n\u003cp\u003e要显示 ToC，请在页面变量中添加以下内容\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eShowToc\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e要在帖子中保持 Toc Open \u003cstrong\u003e默认\u003c/strong\u003e，请在页面变量中添加以下内容：\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eTocOpen\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"面包屑导航\"\u003e面包屑导航\u003c/h3\u003e \u003cp\u003e在帖子标题上方添加面包屑导航以显示小节和导航到主页\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eShowBreadCrumbs\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e可以禁用特定页面的front-matter\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eShowBreadCrumbs\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003efalse\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"编辑帖子链接\"\u003e编辑帖子链接\u003c/h3\u003e \u003cp\u003e添加一个按钮，通过使用帖子的文件路径链接到编辑目标来建议更改。\n\u003cp\u003e对于站点配置使用：\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eParams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eeditPost\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eURL\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"https://github.com/\u003cpath_to_repo\u003e/content\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eText\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"Suggest Changes\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# edit text\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eappendFilePath\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# to append file path to Edit link\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e可以为单个页面修改\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eeditPost\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eURL\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"https://github.com/\u003cpath_to_repo\u003e/content\"\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eText\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\"Suggest Changes\"\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# edit text\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eappendFilePath\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e# to append file path to Edit link\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e上面的示例将生成帖子文件“posts/post-name.md”的以下链接： \u003ca href=\"https://github.com/\"\u003ehttps://github.com/\u003c/a\u003e\u003cpath_to_repo\u003e/content/posts/post-name.md\n\u003ctable\u003e \u003cthead\u003e \u003ctr\u003e \u003cth\u003eParameter\u003c/th\u003e \u003cth\u003eRequired\u003c/th\u003e \u003cth\u003eDefault Value\u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd\u003eeditPost.URL\u003c/td\u003e \u003ctd\u003etrue\u003c/td\u003e \u003ctd\u003e-\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003eeditPost.appendFilePath\u003c/td\u003e \u003ctd\u003efalse\u003c/td\u003e \u003ctd\u003efalse\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003eeditPost.Text\u003c/td\u003e \u003ctd\u003efalse\u003c/td\u003e \u003ctd\u003e“Edit”\u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/table\u003e \u003cp\u003e由于生成的链接是一个普通的 HTML 锚标签 \u003ccode\u003e\u003ca href=...\u003e\u003c/code\u003e，你可以 还可以使用其他 URL 模式，例如 \u003ccode\u003emailto://\u003c/code\u003e，例如 \u003ccode\u003eURL: \"mailto://mail@example.com?subject=Suggesting changes for \"\u003c/code\u003e\n\u003chr\u003e \u003ch3 id=\"帖子下方的其他帖子建议\"\u003e帖子下方的其他帖子建议\u003c/h3\u003e \u003cp\u003e在单个帖子下添加上一个/下一个帖子建议\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eShowPostNavLinks\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"多个作者\"\u003e多个作者\u003c/h3\u003e \u003cp\u003e要在帖子中使用多个作者，在帖子变量中：\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eauthor\u003c/span\u003e: [\u003cspan style=\"color:#e6db74\"\u003e\"Me\"\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\"You\"\u003c/span\u003e] \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e--- \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e要在站点范围内使用多作者，请在 \u003ccode\u003econfig.yml\u003c/code\u003e 中配置：\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003eauthor\u003c/span\u003e: [\u003cspan style=\"color:#e6db74\"\u003e\"Me\"\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\"You\"\u003c/span\u003e] \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e \u003ch3 id=\"注释\"\u003e注释\u003c/h3\u003e \u003cp\u003e要添加评论，请创建一个 html 文件\n\u003cp\u003e\u003ccode\u003elayouts/partials/comments.html\u003c/code\u003e\n\u003cp\u003e并粘贴您的评论提供者提供的代码\n\u003cp\u003e也在配置中添加这个\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yml\" data-lang=\"yml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecomments\u003c/span\u003e: \u003cspan style=\"color:#66d9ef\"\u003etrue\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e阅读更多关于这个问题\u003ca href=\"https://gohugo.io/content-management/comments/\"\u003ehugo-comments\u003c/a\u003e\n\u003chr\u003e \u003ch3 id=\"访问密钥accesskeys\"\u003e访问密钥AccessKeys\u003c/h3\u003e \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-text\" data-lang=\"text\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ec - ToC Open/Close \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eg - Go To Top \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eh - Home (according to current lang) \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003et - Theme toggle \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/ - Jumps to search page if in menu \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003ca href=\"https://www.w3schools.com/tags/att_global_accesskey.asp\"\u003eWhat’s AccessKeys ?\u003c/a\u003e\n\u003chr\u003e \u003ch3 id=\"seo优化\"\u003eSEO优化\u003c/h3\u003e \u003cp\u003e\u003cstrong\u003e仅在 \u003ccode\u003eenv: production\u003c/code\u003e 时启用\u003c/strong\u003e\n\u003cul\u003e \u003cli\u003e\u003ca href=\"https://support.google.com/webmasters/answer/7506797?hl=en\"\u003eRich Results/Snippets Support\u003c/a\u003e\u003c/li\u003e \u003c/ul\u003e \u003ch4 id=\"推特卡片支持\"\u003e推特卡片支持\u003c/h4\u003e \u003cblockquote\u003e \u003cp\u003e译者注: 此特性会在html的head中生成meta name=“twitter:card\"等。此举方便分享到推特上。推特能获取该网站的基本信息，包含图片。\n\u003c/blockquote\u003e \u003cul\u003e \u003cli\u003eThe Twitter Cards metadata, except \u003ccode\u003etwitter:image\u003c/code\u003e should not require additional configuration, since it is generated from metadata that you should already have (for instance the page title and description).\u003c/li\u003e \u003cli\u003eThe \u003ccode\u003etwitter:image\u003c/code\u003e uses the \u003ca href=\"#%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2\"\u003ePost Cover Image\u003c/a\u003e, if present.\u003c/li\u003e \u003cli\u003eIn the absence of a cover images, the first image from the \u003ccode\u003eimages\u003c/code\u003e frontmatter (a list) is used. \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yaml\" data-lang=\"yaml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eimages\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eimage_01.png\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eimage_02.png\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e \u003cli\u003eFinally, if neither of those are provided, \u003ccode\u003etwitter:image\u003c/code\u003e comes from the first \u003ca href=\"https://gohugo.io/content-management/page-bundles/\"\u003ePage Bundle\u003c/a\u003e image with \u003ccode\u003efeature\u003c/code\u003e in the name, with a fallback to the first image with \u003ccode\u003ecover\u003c/code\u003e or \u003ccode\u003ethumbnail\u003c/code\u003e in the name.\u003c/li\u003e \u003c/ul\u003e \u003ch4 id=\"开放内容协议-opengraph-support\"\u003e开放内容协议 OpenGraph support\u003c/h4\u003e \u003cblockquote\u003e \u003cp\u003e译者注: 微博翻译为：兴趣图谱。也称开放图谱。此特性会在html的head中生成meta property=“og:title\"等。此举方便分享到支持OpenGraph的社交媒体上，也能更好的帮助百度等搜索引擎抓取和呈现。\n\u003c/blockquote\u003e \u003cblockquote\u003e \u003cp\u003eOpenGraph样例（Telegram中）\u003cimg loading=\"lazy\" src=\"images/opengraph.jpg\" alt=\"开放图谱\" /\u003e \u003c/blockquote\u003e \u003cul\u003e \u003cli\u003eThe OpenGraph metadata, except \u003ccode\u003eog:image\u003c/code\u003e should not require additional configuration, since it is generated from metadata that you should already have (for instance the page title and description).\u003c/li\u003e \u003cli\u003eThe \u003ccode\u003eog:image\u003c/code\u003e uses the \u003ca href=\"#%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2\"\u003ePost Cover Image\u003c/a\u003e, if present.\u003c/li\u003e \u003cli\u003eIn the absence of a cover images, the first image from the \u003ccode\u003eimages\u003c/code\u003e frontmatter (a list) is used. \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yaml\" data-lang=\"yaml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eimages\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eimage_01.png\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003eimage_02.png\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e \u003cli\u003eFinally, if neither of those are provided, \u003ccode\u003eog:image\u003c/code\u003e comes from the first \u003ca href=\"https://gohugo.io/content-management/page-bundles/\"\u003ePage Bundle\u003c/a\u003e image with \u003ccode\u003efeature\u003c/code\u003e in the name, with a fallback to the first image with \u003ccode\u003ecover\u003c/code\u003e or \u003ccode\u003ethumbnail\u003c/code\u003e in the name.\u003c/li\u003e \u003cli\u003eFor pages, you can also add audio (using frontmatter \u003ccode\u003eaudio: filename.ext\u003c/code\u003e) and/or videos. \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-yaml\" data-lang=\"yaml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003evideos\u003c/span\u003e: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003efilename01.mov\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e - \u003cspan style=\"color:#ae81ff\"\u003efilename02.avi\u003c/span\u003e \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e \u003c/ul\u003e \u003chr\u003e \u003ch3 id=\"多语言支持\"\u003e多语言支持\u003c/h3\u003e \u003chr\u003e \u003ch3 id=\"杂项\"\u003e杂项\u003c/h3\u003e \u003ch4 id=\"滚动条主题默认\"\u003e滚动条主题（默认）\u003c/h4\u003e \u003ch4 id=\"在页内链接之间平滑滚动默认情况下\"\u003e在页内链接之间平滑滚动（默认情况下）\u003c/h4\u003e \u003ch4 id=\"滚动到顶部按钮默认情况下\"\u003e滚动到顶部按钮（默认情况下）\u003c/h4\u003e \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-text\" data-lang=\"text\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDisplays a Scroll-to-Top button in right-bottom corner \u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"谷歌分析集成\"\u003e谷歌分析集成\u003c/h4\u003e \u003ch4 id=\"语法高亮\"\u003e语法高亮\u003c/h4\u003e \u003ch3 id=\"rss订阅\"\u003eRSS订阅\u003c/h3\u003e ",
  "wordCount" : "823",
  "inLanguage": "zh",
  "datePublished": "2021-01-20T00:00:00Z",
  "dateModified": "2021-01-20T00:00:00Z",
  "author":{
    "@type": "Person",
    "name": "Aditya Telange"
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://note.ftls.xyz/papermod/posts/papermod/papermod-features/"
  },
  "publisher": {
    "@type": "Organization",
    "name": "PaperMod",
    "logo": {
      "@type": "ImageObject",
      "url": "https://note.ftls.xyz/papermod/favicon.ico"
    }
  }
}
</script>





</head>

<body class="" id="top">
<script>
    if (localStorage.getItem("pref-theme") === "dark") {
        document.body.classList.add('dark');
    } else if (localStorage.getItem("pref-theme") === "light") {
        document.body.classList.remove('dark')
    } else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
        document.body.classList.add('dark');
    }

</script>
<noscript>
    <style type="text/css">
        #theme-toggle,
        .top-link {
            display: none;
        }

    </style>
    <style>
        @media (prefers-color-scheme: dark) {
            :root {
                --theme: #1d1e20;
                --entry: #2e2e33;
                --primary: rgba(255, 255, 255, 0.84);
                --secondary: rgba(255, 255, 255, 0.56);
                --tertiary: rgba(255, 255, 255, 0.16);
                --content: rgba(255, 255, 255, 0.74);
                --hljs-bg: #2e2e33;
                --code-bg: #37383e;
                --border: #333;
            }

            .list {
                background: var(--theme);
            }

            .list:not(.dark)::-webkit-scrollbar-track {
                background: 0 0;
            }

            .list:not(.dark)::-webkit-scrollbar-thumb {
                border-color: var(--theme);
            }
        }
    </style>

</noscript>
<header class="header">
    <nav class="nav">
        <div class="logo">
            <a href="https://note.ftls.xyz/papermod/" accesskey="h" title="PaperMod (Alt + H)">PaperMod</a>
            <span class="logo-switches">
                <button id="theme-toggle" accesskey="t" title="(Alt + T)">
                    <svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                        stroke-linejoin="round">
                        <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
                    </svg>
                    <svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                        stroke-linejoin="round">
                        <circle cx="12" cy="12" r="5"></circle>
                        <line x1="12" y1="1" x2="12" y2="3"></line>
                        <line x1="12" y1="21" x2="12" y2="23"></line>
                        <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
                        <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
                        <line x1="1" y1="12" x2="3" y2="12"></line>
                        <line x1="21" y1="12" x2="23" y2="12"></line>
                        <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
                        <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
                    </svg>
                </button>
                
                

                <ul class="lang-switch"><li>|</li>
                    <li>
                        <a href="https://note.ftls.xyz/papermod/en/" title="English"
                            aria-label="English">English</a>
                    </li>
                </ul>
            </span>
        </div>
        <ul id="menu" onscroll="menu_on_scroll()">
            <li>
                <a href="https://note.ftls.xyz/papermod/archives" title="Archive">
                    <span>Archive</span>
                </a>
            </li>
            <li>
                <a href="https://note.ftls.xyz/papermod/categories/" title="Categories">
                    <span>Categories</span>
                </a>
            </li>
            <li>
                <a href="https://note.ftls.xyz/papermod/search/" title="Search (Alt &#43; /)" accesskey=/>
                    <span>Search</span>
                </a>
            </li>
            <li>
                <a href="https://note.ftls.xyz/papermod/tags/" title="Tags">
                    <span>Tags</span>
                </a>
            </li></ul>
    </nav>
</header>

    <main class="main">

<article class="post-single">
  <header class="post-header">
<div class="breadcrumbs">

    <a href="https://note.ftls.xyz/papermod/">Home</a>&nbsp;»&nbsp;<a href="https://note.ftls.xyz/papermod/posts/">Posts</a>&nbsp;»&nbsp;<a href="https://note.ftls.xyz/papermod/posts/papermod/">PaperMod</a>
</div>

    <h1 class="post-title">
      [译]特性
    </h1>
    <div class="post-meta">

January 20, 2021&nbsp;·&nbsp;4 分钟&nbsp;·&nbsp;Aditya Telange
&nbsp;|&nbsp;
<ul class="i18n_list">语言:
    <li>
        <a href="https://note.ftls.xyz/papermod/en/posts/papermod/papermod-features/">English</a>
    </li>
</ul>
|&nbsp;<a href="mailto://snowandocean@foxmail.com?subject=Suggesting%20changes%20for" rel="noopener noreferrer" target="_blank">Suggest Changes</a>
</div>
  </header> 

  <div class="toc">
    <details >
      <summary accesskey="c" title="(Alt + C)">
        <div class="details">目录</div>
      </summary>
      <div class="inner"><ul><li>
        <a href="#%e4%bb%8b%e7%bb%8d" aria-label="介绍">介绍</a></li><li>
        <a href="#assets-jscss" aria-label="Assets (js/css)">Assets (js/css)</a></li><li>
        <a href="#%e9%bb%98%e8%ae%a4%e4%b8%bb%e9%a2%98%e4%ba%ae%e6%9a%97%e8%87%aa%e5%8a%a8" aria-label="默认主题亮/暗/自动">默认主题亮/暗/自动</a></li><li>
        <a href="#%e4%b8%bb%e9%a2%98%e5%88%87%e6%8d%a2%e5%88%87%e6%8d%a2%e9%bb%98%e8%ae%a4%e5%90%af%e7%94%a8" aria-label="主题切换切换（默认启用）">主题切换切换（默认启用）</a></li><li>
        <a href="#%e5%bd%92%e6%a1%a3%e5%b8%83%e5%b1%80-archives-layout" aria-label="归档布局 Archives Layout">归档布局 Archives Layout</a></li><li>
        <a href="#%e4%b8%bb%e9%a1%b5%e6%a8%a1%e5%bc%8f-regular-mode-default-mode" aria-label="主页模式 Regular Mode (default-mode)">主页模式 Regular Mode (default-mode)</a></li><li>
        <a href="#%e4%b8%bb%e9%a1%b5%e6%a8%a1%e5%bc%8f-home-info-mode" aria-label="主页模式 Home-Info Mode">主页模式 Home-Info Mode</a></li><li>
        <a href="#%e4%b8%bb%e9%a1%b5%e6%a8%a1%e5%bc%8f-profile-mode" aria-label="主页模式 Profile Mode">主页模式 Profile Mode</a></li><li>
        <a href="#%e6%90%9c%e7%b4%a2%e9%a1%b5-search-page" aria-label="搜索页 Search Page">搜索页 Search Page</a></li><li>
        <a href="#draft-page-indication" aria-label="Draft Page indication">Draft Page indication</a></li><li>
        <a href="#%e6%96%87%e7%ab%a0%e5%b0%81%e9%9d%a2" aria-label="文章封面">文章封面</a></li><li>
        <a href="#%e6%96%87%e7%ab%a0%e5%88%86%e4%ba%ab%e6%8c%89%e9%92%ae" aria-label="文章分享按钮">文章分享按钮</a></li><li>
        <a href="#%e6%98%be%e7%a4%ba%e6%96%87%e7%ab%a0%e9%98%85%e8%af%bb%e6%97%b6%e9%97%b4" aria-label="显示文章阅读时间">显示文章阅读时间</a></li><li>
        <a href="#%e5%9c%a8%e5%8d%9a%e5%ae%a2%e6%96%87%e7%ab%a0%e4%b8%ad%e6%98%be%e7%a4%ba%e7%9b%ae%e5%bd%95-toc" aria-label="在博客文章中显示目录 (Toc)">在博客文章中显示目录 (Toc)</a></li><li>
        <a href="#%e9%9d%a2%e5%8c%85%e5%b1%91%e5%af%bc%e8%88%aa" aria-label="面包屑导航">面包屑导航</a></li><li>
        <a href="#%e7%bc%96%e8%be%91%e5%b8%96%e5%ad%90%e9%93%be%e6%8e%a5" aria-label="编辑帖子链接">编辑帖子链接</a></li><li>
        <a href="#%e5%b8%96%e5%ad%90%e4%b8%8b%e6%96%b9%e7%9a%84%e5%85%b6%e4%bb%96%e5%b8%96%e5%ad%90%e5%bb%ba%e8%ae%ae" aria-label="帖子下方的其他帖子建议">帖子下方的其他帖子建议</a></li><li>
        <a href="#%e5%a4%9a%e4%b8%aa%e4%bd%9c%e8%80%85" aria-label="多个作者">多个作者</a></li><li>
        <a href="#%e6%b3%a8%e9%87%8a" aria-label="注释">注释</a></li><li>
        <a href="#%e8%ae%bf%e9%97%ae%e5%af%86%e9%92%a5accesskeys" aria-label="访问密钥AccessKeys">访问密钥AccessKeys</a></li><li>
        <a href="#seo%e4%bc%98%e5%8c%96" aria-label="SEO优化">SEO优化</a><ul>
            <li>
        <a href="#%e6%8e%a8%e7%89%b9%e5%8d%a1%e7%89%87%e6%94%af%e6%8c%81" aria-label="推特卡片支持">推特卡片支持</a></li><li>
        <a href="#%e5%bc%80%e6%94%be%e5%86%85%e5%ae%b9%e5%8d%8f%e8%ae%ae-opengraph-support" aria-label="开放内容协议 OpenGraph support">开放内容协议 OpenGraph support</a></li></ul>
    </li><li>
        <a href="#%e5%a4%9a%e8%af%ad%e8%a8%80%e6%94%af%e6%8c%81" aria-label="多语言支持">多语言支持</a></li><li>
        <a href="#%e6%9d%82%e9%a1%b9" aria-label="杂项">杂项</a><ul>
            <li>
        <a href="#%e6%bb%9a%e5%8a%a8%e6%9d%a1%e4%b8%bb%e9%a2%98%e9%bb%98%e8%ae%a4" aria-label="滚动条主题（默认）">滚动条主题（默认）</a></li><li>
        <a href="#%e5%9c%a8%e9%a1%b5%e5%86%85%e9%93%be%e6%8e%a5%e4%b9%8b%e9%97%b4%e5%b9%b3%e6%bb%91%e6%bb%9a%e5%8a%a8%e9%bb%98%e8%ae%a4%e6%83%85%e5%86%b5%e4%b8%8b" aria-label="在页内链接之间平滑滚动（默认情况下）">在页内链接之间平滑滚动（默认情况下）</a></li><li>
        <a href="#%e6%bb%9a%e5%8a%a8%e5%88%b0%e9%a1%b6%e9%83%a8%e6%8c%89%e9%92%ae%e9%bb%98%e8%ae%a4%e6%83%85%e5%86%b5%e4%b8%8b" aria-label="滚动到顶部按钮（默认情况下）">滚动到顶部按钮（默认情况下）</a></li><li>
        <a href="#%e8%b0%b7%e6%ad%8c%e5%88%86%e6%9e%90%e9%9b%86%e6%88%90" aria-label="谷歌分析集成">谷歌分析集成</a></li><li>
        <a href="#%e8%af%ad%e6%b3%95%e9%ab%98%e4%ba%ae" aria-label="语法高亮">语法高亮</a></li></ul>
    </li><li>
        <a href="#rss%e8%ae%a2%e9%98%85" aria-label="RSS订阅">RSS订阅</a></li></ul>
      </div>
    </details>
  </div>
  <div class="post-content">
<blockquote>
<p>转载自: <a href="https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/">https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/</a></p>
</blockquote>
<h3 id="介绍">介绍<a hidden class="anchor" aria-hidden="true" href="#介绍">#</a></h3>
<ul>
<li>
<p><strong>我们将在下面的所有示例中使用 <code>yml/yaml</code> 格式，我建议使用 <code>yml</code> 而不是 <code>toml</code>，因为它更易于阅读。</strong></p>
</li>
<li>
<p>如果你需要，你可以找 <a href="https://www.baidu.com/s?ie=UTF-8&amp;wd=yml+to+toml">YML to TOML</a> 这类转换器。</p>
</li>
</ul>
<hr>
<h3 id="assets-jscss">Assets (js/css)<a hidden class="anchor" aria-hidden="true" href="#assets-jscss">#</a></h3>
<p>以下是默认启用的</p>
<ul>
<li><a href="https://gohugo.io/hugo-pipes/minification/">minification</a> - makes the assets size smallest as possible.</li>
<li><a href="https://gohugo.io/hugo-pipes/bundling/">bundling</a> - bundles all the styles in one single asset</li>
<li><a href="https://gohugo.io/hugo-pipes/fingerprint/">fingerprint/integrity</a> check.</li>
</ul>
<hr>
<h3 id="默认主题亮暗自动">默认主题亮/暗/自动<a hidden class="anchor" aria-hidden="true" href="#默认主题亮暗自动">#</a></h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># defaultTheme: light</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># defaultTheme: dark</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">defaultTheme</span>: <span style="color:#ae81ff">auto</span> <span style="color:#75715e"># to switch between dark or light according to browser theme</span>
</span></span></code></pre></div></details>
<hr>
<h3 id="主题切换切换默认启用">主题切换切换（默认启用）<a hidden class="anchor" aria-hidden="true" href="#主题切换切换默认启用">#</a></h3>
<p>在页面标题之外显示图标以更改主题</p>
<p>禁用方法：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">disableThemeToggle</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><p>您可以参考下表以更好地理解&hellip;</p>
<table>
<thead>
<tr>
<th><code>defaultTheme</code></th>
<th><code>disableThemeToggle</code></th>
<th>checks local storage?</th>
<th>checks system theme?</th>
<th>Info</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>auto</code></td>
<td>true</td>
<td>No</td>
<td>Yes</td>
<td>only system theme</td>
</tr>
<tr>
<td></td>
<td>false</td>
<td>Yes (if not-&gt;2)</td>
<td>Yes (2)</td>
<td><em>switch present</em></td>
</tr>
<tr>
<td><code>dark</code></td>
<td>true</td>
<td>No</td>
<td>No</td>
<td>force dark only</td>
</tr>
<tr>
<td></td>
<td>false</td>
<td>Yes</td>
<td>No</td>
<td><em>switch present</em></td>
</tr>
<tr>
<td><code>light</code></td>
<td>true</td>
<td>No</td>
<td>No</td>
<td>force light only</td>
</tr>
<tr>
<td></td>
<td>false</td>
<td>Yes</td>
<td>No</td>
<td><em>switch present</em></td>
</tr>
</tbody>
</table>
<hr>
<h3 id="归档布局-archives-layout">归档布局 Archives Layout<a hidden class="anchor" aria-hidden="true" href="#归档布局-archives-layout">#</a></h3>
<p>在<code>content</code>目录中创建一个带有<code>archive.md</code>的页面，内容如下</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>.
</span></span><span style="display:flex;"><span>├── config.yml
</span></span><span style="display:flex;"><span>├── content/
</span></span><span style="display:flex;"><span>│   ├── archives.md   &lt;--- Create archive.md here
</span></span><span style="display:flex;"><span>│   └── posts/
</span></span><span style="display:flex;"><span>├── static/
</span></span><span style="display:flex;"><span>└── themes/
</span></span><span style="display:flex;"><span>    └── PaperMod/
</span></span></code></pre></div><p>并添加以下内容</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;Archive&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">layout</span>: <span style="color:#e6db74">&#34;archives&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;/archives/&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">summary</span>: <span style="color:#ae81ff">archives</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p><strong>注意：</strong> Archives Layout不支持多语言月份翻译。</p>
<p>如: <a href="https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/archives.md">archives.md</a></p>
<hr>
<h3 id="主页模式-regular-mode-default-mode">主页模式 Regular Mode (default-mode)<a hidden class="anchor" aria-hidden="true" href="#主页模式-regular-mode-default-mode">#</a></h3>
<p><img loading="lazy" src="images/regular.jpg" alt="regular"  />
</p>
<hr>
<h3 id="主页模式-home-info-mode">主页模式 Home-Info Mode<a hidden class="anchor" aria-hidden="true" href="#主页模式-home-info-mode">#</a></h3>
<p><img loading="lazy" src="images/homeinfo.jpg" alt="homeinfo"  />
</p>
<p>使用第一个条目作为一些显示信息</p>
<p>将以下内容添加到配置文件中</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">homeInfoParams</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">Title</span>: <span style="color:#ae81ff">Hi there wave</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">Content</span>: <span style="color:#ae81ff">Can be Info, links, about...</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">socialIcons</span>: <span style="color:#75715e"># optional</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#f92672">name</span>: <span style="color:#e6db74">&#34;&lt;platform&gt;&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;&lt;link&gt;&#34;</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#f92672">name</span>: <span style="color:#e6db74">&#34;&lt;platform 2&gt;&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;&lt;link2&gt;&#34;</span>
</span></span></code></pre></div><p>如. <a href="https://github.com/adityatelange/hugo-PaperMod/blob/exampleSite/config.yml#L106">config.yml#L106</a></p>
<hr>
<h3 id="主页模式-profile-mode">主页模式 Profile Mode<a hidden class="anchor" aria-hidden="true" href="#主页模式-profile-mode">#</a></h3>
<p><img loading="lazy" src="images/profile.jpg" alt="profile"  />
</p>
<p>将索引/主页显示为带有社交链接和图像的整页</p>
<p>将以下内容添加到配置文件中</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">profileMode</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">enabled</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;&lt;Title&gt;&#34;</span> <span style="color:#75715e"># optional default will be site title</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">subtitle</span>: <span style="color:#e6db74">&#34;This is subtitle&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">imageUrl</span>: <span style="color:#e6db74">&#34;&lt;image link&gt;&#34;</span> <span style="color:#75715e"># optional</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">imageTitle</span>: <span style="color:#e6db74">&#34;&lt;title of image as alt&gt;&#34;</span> <span style="color:#75715e"># optional</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">imageWidth</span>: <span style="color:#ae81ff">120</span> <span style="color:#75715e"># custom size</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">imageHeight</span>: <span style="color:#ae81ff">120</span> <span style="color:#75715e"># custom size</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">buttons</span>:
</span></span><span style="display:flex;"><span>            - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">Archive</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;/archive&#34;</span>
</span></span><span style="display:flex;"><span>            - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">Github</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;https://github.com/&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">socialIcons</span>: <span style="color:#75715e"># optional</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#f92672">name</span>: <span style="color:#e6db74">&#34;&lt;platform&gt;&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;&lt;link&gt;&#34;</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#f92672">name</span>: <span style="color:#e6db74">&#34;&lt;platform 2&gt;&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">url</span>: <span style="color:#e6db74">&#34;&lt;link2&gt;&#34;</span>
</span></span></code></pre></div><hr>
<h3 id="搜索页-search-page">搜索页 Search Page<a hidden class="anchor" aria-hidden="true" href="#搜索页-search-page">#</a></h3>
<p>PaperMod 使用<a href="https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds">Fuse.js Basic</a> for seach functionality</p>
<p>将以下内容添加到站点配置，<code>config.yml</code></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">outputs</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">home</span>:
</span></span><span style="display:flex;"><span>        - <span style="color:#ae81ff">HTML</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#ae81ff">RSS</span>
</span></span><span style="display:flex;"><span>        - <span style="color:#ae81ff">JSON</span> <span style="color:#75715e"># is necessary</span>
</span></span></code></pre></div><p>在<code>content</code>目录下创建一个带有<code>search.md</code>的页面，内容如下</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;Search&#34;</span> <span style="color:#75715e"># in any language you want</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">layout</span>: <span style="color:#e6db74">&#34;search&#34;</span> <span style="color:#75715e"># is necessary</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># url: &#34;/archive&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># description: &#34;Description for Search&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">summary</span>: <span style="color:#e6db74">&#34;search&#34;</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p>要隐藏特定页面不被搜索，请将其添加到帖子的前面</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">searchHidden</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><p>如: <a href="https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md">search.md</a></p>
<blockquote>
<p>搜索页面也有键绑定：</p>
<ul>
<li>向上/向下移动列表的箭头键</li>
<li>Enter 键（返回）或右箭头键转到突出显示的页面</li>
<li>清除搜索框和结果的退出键</li>
</ul>
</blockquote>
<p>对于多语言使用 <code>search.&lt;lang&gt;.md</code> 例如。 <code>search.es.md</code>。</p>
<p><strong>注意：</strong> 搜索仅适用于当前语言，用户当前使用的语言 !</p>
<p><strong>自定义 Fusejs 选项</strong></p>
<p>有关选项，请参阅 <a href="https://fusejs.io/api/options.html">https://fusejs.io/api/options.html</a>，添加如下所示的选项。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">fuseOpts</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">isCaseSensitive</span>: <span style="color:#66d9ef">false</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">shouldSort</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">location</span>: <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">distance</span>: <span style="color:#ae81ff">1000</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">threshold</span>: <span style="color:#ae81ff">0.4</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">minMatchCharLength</span>: <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">keys</span>: [<span style="color:#e6db74">&#34;title&#34;</span>, <span style="color:#e6db74">&#34;permalink&#34;</span>, <span style="color:#e6db74">&#34;summary&#34;</span>, <span style="color:#e6db74">&#34;content&#34;</span>]
</span></span></code></pre></div><hr>
<h3 id="draft-page-indication">Draft Page indication<a hidden class="anchor" aria-hidden="true" href="#draft-page-indication">#</a></h3>
<p>添加<code>[draft]</code> 标记以指示草稿页面。</p>
<hr>
<h3 id="文章封面">文章封面<a hidden class="anchor" aria-hidden="true" href="#文章封面">#</a></h3>
<p>在帖子的页面变量中添加：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">cover</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">image</span>: <span style="color:#e6db74">&#34;&lt;image path/url&gt;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># can also paste direct link from external site</span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">alt</span>: <span style="color:#e6db74">&#34;&lt;alt text&gt;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">caption</span>: <span style="color:#e6db74">&#34;&lt;text&gt;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">relative</span>: <span style="color:#66d9ef">false</span> <span style="color:#75715e"># To use relative path for cover image, used in hugo Page-bundles</span>
</span></span></code></pre></div><p>当您在 <a href="https://gohugo.io/content-management/page-bundles/">Page Bundle</a> 中包含图像时，将使用 HTML5 <code>srcset</code> 字段自动提供多种尺寸的图像。</p>
<p>为了减少站点的生成时间和大小，您可以使用禁用此功能</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">cover</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">responsiveImages</span>: <span style="color:#66d9ef">false</span>
</span></span></code></pre></div><p>要在帖子页面上启用指向完整图像大小的超链接，请使用</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">cover</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">linkFullImages</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><hr>
<h3 id="文章分享按钮">文章分享按钮<a hidden class="anchor" aria-hidden="true" href="#文章分享按钮">#</a></h3>
<p>在每个帖子的底部显示分享按钮</p>
<p>要显示共享按钮添加</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">ShowShareButtons</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><hr>
<h3 id="显示文章阅读时间">显示文章阅读时间<a hidden class="anchor" aria-hidden="true" href="#显示文章阅读时间">#</a></h3>
<p>显示阅读时间（阅读内容所需的估计时间，以分钟为单位。）</p>
<p>要显示阅读时间添加</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">Params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">ShowReadingTime</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><hr>
<h3 id="在博客文章中显示目录-toc">在博客文章中显示目录 (Toc)<a hidden class="anchor" aria-hidden="true" href="#在博客文章中显示目录-toc">#</a></h3>
<p>在博客页面上显示 ToC</p>
<p>要显示 ToC，请在页面变量中添加以下内容</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">ShowToc</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><p>要在帖子中保持 Toc Open <strong>默认</strong>，请在页面变量中添加以下内容：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">TocOpen</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><hr>
<h3 id="面包屑导航">面包屑导航<a hidden class="anchor" aria-hidden="true" href="#面包屑导航">#</a></h3>
<p>在帖子标题上方添加面包屑导航以显示小节和导航到主页</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">ShowBreadCrumbs</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><p>可以禁用特定页面的front-matter</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">ShowBreadCrumbs</span>: <span style="color:#66d9ef">false</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><hr>
<h3 id="编辑帖子链接">编辑帖子链接<a hidden class="anchor" aria-hidden="true" href="#编辑帖子链接">#</a></h3>
<p>添加一个按钮，通过使用帖子的文件路径链接到编辑目标来建议更改。</p>
<p>对于站点配置使用：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">Params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">editPost</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">URL</span>: <span style="color:#e6db74">&#34;https://github.com/&lt;path_to_repo&gt;/content&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">Text</span>: <span style="color:#e6db74">&#34;Suggest Changes&#34;</span> <span style="color:#75715e"># edit text</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">appendFilePath</span>: <span style="color:#66d9ef">true</span> <span style="color:#75715e"># to append file path to Edit link</span>
</span></span></code></pre></div><p>可以为单个页面修改</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">editPost</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">URL</span>: <span style="color:#e6db74">&#34;https://github.com/&lt;path_to_repo&gt;/content&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">Text</span>: <span style="color:#e6db74">&#34;Suggest Changes&#34;</span> <span style="color:#75715e"># edit text</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">appendFilePath</span>: <span style="color:#66d9ef">true</span> <span style="color:#75715e"># to append file path to Edit link</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p>上面的示例将生成帖子文件“posts/post-name.md”的以下链接：
<a href="https://github.com/">https://github.com/</a>&lt;path_to_repo&gt;/content/posts/post-name.md</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Required</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>editPost.URL</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>editPost.appendFilePath</td>
<td>false</td>
<td>false</td>
</tr>
<tr>
<td>editPost.Text</td>
<td>false</td>
<td>&ldquo;Edit&rdquo;</td>
</tr>
</tbody>
</table>
<p>由于生成的链接是一个普通的 HTML 锚标签 <code>&lt;a href=...&gt;</code>，你可以
还可以使用其他 URL 模式，例如 <code>mailto://</code>，例如
<code>URL: &quot;mailto://mail@example.com?subject=Suggesting changes for &quot;</code></p>
<hr>
<h3 id="帖子下方的其他帖子建议">帖子下方的其他帖子建议<a hidden class="anchor" aria-hidden="true" href="#帖子下方的其他帖子建议">#</a></h3>
<p>在单个帖子下添加上一个/下一个帖子建议</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">ShowPostNavLinks</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><hr>
<h3 id="多个作者">多个作者<a hidden class="anchor" aria-hidden="true" href="#多个作者">#</a></h3>
<p>要在帖子中使用多个作者，在帖子变量中：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">author</span>: [<span style="color:#e6db74">&#34;Me&#34;</span>, <span style="color:#e6db74">&#34;You&#34;</span>]
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p>要在站点范围内使用多作者，请在 <code>config.yml</code> 中配置：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">author</span>: [<span style="color:#e6db74">&#34;Me&#34;</span>, <span style="color:#e6db74">&#34;You&#34;</span>]
</span></span></code></pre></div><hr>
<h3 id="注释">注释<a hidden class="anchor" aria-hidden="true" href="#注释">#</a></h3>
<p>要添加评论，请创建一个 html 文件</p>
<p><code>layouts/partials/comments.html</code></p>
<p>并粘贴您的评论提供者提供的代码</p>
<p>也在配置中添加这个</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">comments</span>: <span style="color:#66d9ef">true</span>
</span></span></code></pre></div><p>阅读更多关于这个问题<a href="https://gohugo.io/content-management/comments/">hugo-comments</a></p>
<hr>
<h3 id="访问密钥accesskeys">访问密钥AccessKeys<a hidden class="anchor" aria-hidden="true" href="#访问密钥accesskeys">#</a></h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>c - ToC Open/Close
</span></span><span style="display:flex;"><span>g - Go To Top
</span></span><span style="display:flex;"><span>h - Home (according to current lang)
</span></span><span style="display:flex;"><span>t - Theme toggle
</span></span><span style="display:flex;"><span>/ - Jumps to search page if in menu
</span></span></code></pre></div><p><a href="https://www.w3schools.com/tags/att_global_accesskey.asp">What&rsquo;s AccessKeys ?</a></p>
<hr>
<h3 id="seo优化">SEO优化<a hidden class="anchor" aria-hidden="true" href="#seo优化">#</a></h3>
<p><strong>仅在 <code>env: production</code> 时启用</strong></p>
<ul>
<li><a href="https://support.google.com/webmasters/answer/7506797?hl=en">Rich Results/Snippets Support</a></li>
</ul>
<h4 id="推特卡片支持">推特卡片支持<a hidden class="anchor" aria-hidden="true" href="#推特卡片支持">#</a></h4>
<blockquote>
<p>译者注: 此特性会在html的head中生成meta name=&ldquo;twitter:card&quot;等。此举方便分享到推特上。推特能获取该网站的基本信息，包含图片。</p>
</blockquote>
<ul>
<li>The Twitter Cards metadata, except <code>twitter:image</code> should not require
additional configuration, since it is generated from metadata that
you should already have (for instance the page title and description).</li>
<li>The <code>twitter:image</code> uses the <a href="#%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2">Post Cover Image</a>, if present.</li>
<li>In the absence of a cover images, the first image from the <code>images</code>
frontmatter (a list) is used.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">images</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">image_01.png</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">image_02.png</span>
</span></span></code></pre></div></li>
<li>Finally, if neither of those are provided, <code>twitter:image</code> comes from the first
<a href="https://gohugo.io/content-management/page-bundles/">Page Bundle</a>
image with <code>feature</code> in the name, with a fallback to the first image with
<code>cover</code> or <code>thumbnail</code> in the name.</li>
</ul>
<h4 id="开放内容协议-opengraph-support">开放内容协议 OpenGraph support<a hidden class="anchor" aria-hidden="true" href="#开放内容协议-opengraph-support">#</a></h4>
<blockquote>
<p>译者注: 微博翻译为：兴趣图谱。也称开放图谱。此特性会在html的head中生成meta property=&ldquo;og:title&quot;等。此举方便分享到支持OpenGraph的社交媒体上，也能更好的帮助百度等搜索引擎抓取和呈现。</p>
</blockquote>
<blockquote>
<p>OpenGraph样例（Telegram中）<img loading="lazy" src="images/opengraph.jpg" alt="开放图谱"  />
</p>
</blockquote>
<ul>
<li>The OpenGraph metadata, except <code>og:image</code> should not require
additional configuration, since it is generated from metadata that
you should already have (for instance the page title and description).</li>
<li>The <code>og:image</code> uses the <a href="#%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2">Post Cover Image</a>, if present.</li>
<li>In the absence of a cover images, the first image from the <code>images</code>
frontmatter (a list) is used.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">images</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">image_01.png</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">image_02.png</span>
</span></span></code></pre></div></li>
<li>Finally, if neither of those are provided, <code>og:image</code> comes from the first
<a href="https://gohugo.io/content-management/page-bundles/">Page Bundle</a>
image with <code>feature</code> in the name, with a fallback to the first image with
<code>cover</code> or <code>thumbnail</code> in the name.</li>
<li>For pages, you can also add audio (using frontmatter <code>audio: filename.ext</code>) and/or
videos.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">videos</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">filename01.mov</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">filename02.avi</span>
</span></span></code></pre></div></li>
</ul>
<hr>
<h3 id="多语言支持">多语言支持<a hidden class="anchor" aria-hidden="true" href="#多语言支持">#</a></h3>
<hr>
<h3 id="杂项">杂项<a hidden class="anchor" aria-hidden="true" href="#杂项">#</a></h3>
<h4 id="滚动条主题默认">滚动条主题（默认）<a hidden class="anchor" aria-hidden="true" href="#滚动条主题默认">#</a></h4>
<h4 id="在页内链接之间平滑滚动默认情况下">在页内链接之间平滑滚动（默认情况下）<a hidden class="anchor" aria-hidden="true" href="#在页内链接之间平滑滚动默认情况下">#</a></h4>
<h4 id="滚动到顶部按钮默认情况下">滚动到顶部按钮（默认情况下）<a hidden class="anchor" aria-hidden="true" href="#滚动到顶部按钮默认情况下">#</a></h4>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>Displays a Scroll-to-Top button in right-bottom corner
</span></span></code></pre></div><h4 id="谷歌分析集成">谷歌分析集成<a hidden class="anchor" aria-hidden="true" href="#谷歌分析集成">#</a></h4>
<h4 id="语法高亮">语法高亮<a hidden class="anchor" aria-hidden="true" href="#语法高亮">#</a></h4>
<h3 id="rss订阅">RSS订阅<a hidden class="anchor" aria-hidden="true" href="#rss订阅">#</a></h3>

</div>
  <footer class="post-footer">
    <ul class="post-tags">
      <li><a href="https://note.ftls.xyz/papermod/tags/papermod/">PaperMod</a></li>
    </ul>
    <nav class="paginav">
      <a class="prev" href="https://note.ftls.xyz/papermod/posts/papermod/papermod-installation/">
        <span class="title">« 上一页</span>
        <br>
        <span>[译]安装 | 升级</span>
      </a>
      <a class="next" href="https://note.ftls.xyz/papermod/posts/papermod/papermod-faq/">
        <span class="title">下一页 »</span>
        <br>
        <span>[译]FAQs</span>
      </a>
    </nav>






<div class="share-buttons">
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on twitter"
        href="https://twitter.com/intent/tweet/?text=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7&amp;url=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f&amp;hashtags=PaperMod">
        <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
            <path
                d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-253.927,424.544c135.939,0 210.268,-112.643 210.268,-210.268c0,-3.218 0,-6.437 -0.153,-9.502c14.406,-10.421 26.973,-23.448 36.935,-38.314c-13.18,5.824 -27.433,9.809 -42.452,11.648c15.326,-9.196 26.973,-23.602 32.49,-40.92c-14.252,8.429 -30.038,14.56 -46.896,17.931c-13.487,-14.406 -32.644,-23.295 -53.946,-23.295c-40.767,0 -73.87,33.104 -73.87,73.87c0,5.824 0.613,11.494 1.992,16.858c-61.456,-3.065 -115.862,-32.49 -152.337,-77.241c-6.284,10.881 -9.962,23.601 -9.962,37.088c0,25.594 13.027,48.276 32.95,61.456c-12.107,-0.307 -23.448,-3.678 -33.41,-9.196l0,0.92c0,35.862 25.441,65.594 59.311,72.49c-6.13,1.686 -12.72,2.606 -19.464,2.606c-4.751,0 -9.348,-0.46 -13.946,-1.38c9.349,29.426 36.628,50.728 68.965,51.341c-25.287,19.771 -57.164,31.571 -91.8,31.571c-5.977,0 -11.801,-0.306 -17.625,-1.073c32.337,21.15 71.264,33.41 112.95,33.41Z" />
        </svg>
    </a>
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on linkedin"
        href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f&amp;title=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7&amp;summary=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7&amp;source=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f">
        <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
            <path
                d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-288.985,423.278l0,-225.717l-75.04,0l0,225.717l75.04,0Zm270.539,0l0,-129.439c0,-69.333 -37.018,-101.586 -86.381,-101.586c-39.804,0 -57.634,21.891 -67.617,37.266l0,-31.958l-75.021,0c0.995,21.181 0,225.717 0,225.717l75.02,0l0,-126.056c0,-6.748 0.486,-13.492 2.474,-18.315c5.414,-13.475 17.767,-27.434 38.494,-27.434c27.135,0 38.007,20.707 38.007,51.037l0,120.768l75.024,0Zm-307.552,-334.556c-25.674,0 -42.448,16.879 -42.448,39.002c0,21.658 16.264,39.002 41.455,39.002l0.484,0c26.165,0 42.452,-17.344 42.452,-39.002c-0.485,-22.092 -16.241,-38.954 -41.943,-39.002Z" />
        </svg>
    </a>
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on reddit"
        href="https://reddit.com/submit?url=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f&title=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7">
        <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
            <path
                d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-3.446,265.638c0,-22.964 -18.616,-41.58 -41.58,-41.58c-11.211,0 -21.361,4.457 -28.841,11.666c-28.424,-20.508 -67.586,-33.757 -111.204,-35.278l18.941,-89.121l61.884,13.157c0.756,15.734 13.642,28.29 29.56,28.29c16.407,0 29.706,-13.299 29.706,-29.701c0,-16.403 -13.299,-29.702 -29.706,-29.702c-11.666,0 -21.657,6.792 -26.515,16.578l-69.105,-14.69c-1.922,-0.418 -3.939,-0.042 -5.585,1.036c-1.658,1.073 -2.811,2.761 -3.224,4.686l-21.152,99.438c-44.258,1.228 -84.046,14.494 -112.837,35.232c-7.468,-7.164 -17.589,-11.591 -28.757,-11.591c-22.965,0 -41.585,18.616 -41.585,41.58c0,16.896 10.095,31.41 24.568,37.918c-0.639,4.135 -0.99,8.328 -0.99,12.576c0,63.977 74.469,115.836 166.33,115.836c91.861,0 166.334,-51.859 166.334,-115.836c0,-4.218 -0.347,-8.387 -0.977,-12.493c14.564,-6.47 24.735,-21.034 24.735,-38.001Zm-119.474,108.193c-20.27,20.241 -59.115,21.816 -70.534,21.816c-11.428,0 -50.277,-1.575 -70.522,-21.82c-3.007,-3.008 -3.007,-7.882 0,-10.889c3.003,-2.999 7.882,-3.003 10.885,0c12.777,12.781 40.11,17.317 59.637,17.317c19.522,0 46.86,-4.536 59.657,-17.321c3.016,-2.999 7.886,-2.995 10.885,0.008c3.008,3.011 3.003,7.882 -0.008,10.889Zm-5.23,-48.781c-16.373,0 -29.701,-13.324 -29.701,-29.698c0,-16.381 13.328,-29.714 29.701,-29.714c16.378,0 29.706,13.333 29.706,29.714c0,16.374 -13.328,29.698 -29.706,29.698Zm-160.386,-29.702c0,-16.381 13.328,-29.71 29.714,-29.71c16.369,0 29.689,13.329 29.689,29.71c0,16.373 -13.32,29.693 -29.689,29.693c-16.386,0 -29.714,-13.32 -29.714,-29.693Z" />
        </svg>
    </a>
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on facebook"
        href="https://facebook.com/sharer/sharer.php?u=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f">
        <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
            <path
                d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-106.468,0l0,-192.915l66.6,0l12.672,-82.621l-79.272,0l0,-53.617c0,-22.603 11.073,-44.636 46.58,-44.636l36.042,0l0,-70.34c0,0 -32.71,-5.582 -63.982,-5.582c-65.288,0 -107.96,39.569 -107.96,111.204l0,62.971l-72.573,0l0,82.621l72.573,0l0,192.915l-191.104,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Z" />
        </svg>
    </a>
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on whatsapp"
        href="https://api.whatsapp.com/send?text=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7%20-%20https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f">
        <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
            <path
                d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-58.673,127.703c-33.842,-33.881 -78.847,-52.548 -126.798,-52.568c-98.799,0 -179.21,80.405 -179.249,179.234c-0.013,31.593 8.241,62.428 23.927,89.612l-25.429,92.884l95.021,-24.925c26.181,14.28 55.659,21.807 85.658,21.816l0.074,0c98.789,0 179.206,-80.413 179.247,-179.243c0.018,-47.895 -18.61,-92.93 -52.451,-126.81Zm-126.797,275.782l-0.06,0c-26.734,-0.01 -52.954,-7.193 -75.828,-20.767l-5.441,-3.229l-56.386,14.792l15.05,-54.977l-3.542,-5.637c-14.913,-23.72 -22.791,-51.136 -22.779,-79.287c0.033,-82.142 66.867,-148.971 149.046,-148.971c39.793,0.014 77.199,15.531 105.329,43.692c28.128,28.16 43.609,65.592 43.594,105.4c-0.034,82.149 -66.866,148.983 -148.983,148.984Zm81.721,-111.581c-4.479,-2.242 -26.499,-13.075 -30.604,-14.571c-4.105,-1.495 -7.091,-2.241 -10.077,2.241c-2.986,4.483 -11.569,14.572 -14.182,17.562c-2.612,2.988 -5.225,3.364 -9.703,1.12c-4.479,-2.241 -18.91,-6.97 -36.017,-22.23c-13.314,-11.876 -22.304,-26.542 -24.916,-31.026c-2.612,-4.484 -0.279,-6.908 1.963,-9.14c2.016,-2.007 4.48,-5.232 6.719,-7.847c2.24,-2.615 2.986,-4.484 4.479,-7.472c1.493,-2.99 0.747,-5.604 -0.374,-7.846c-1.119,-2.241 -10.077,-24.288 -13.809,-33.256c-3.635,-8.733 -7.327,-7.55 -10.077,-7.688c-2.609,-0.13 -5.598,-0.158 -8.583,-0.158c-2.986,0 -7.839,1.121 -11.944,5.604c-4.105,4.484 -15.675,15.32 -15.675,37.364c0,22.046 16.048,43.342 18.287,46.332c2.24,2.99 31.582,48.227 76.511,67.627c10.685,4.615 19.028,7.371 25.533,9.434c10.728,3.41 20.492,2.929 28.209,1.775c8.605,-1.285 26.499,-10.833 30.231,-21.295c3.732,-10.464 3.732,-19.431 2.612,-21.298c-1.119,-1.869 -4.105,-2.99 -8.583,-5.232Z" />
        </svg>
    </a>
    <a target="_blank" rel="noopener noreferrer" aria-label="share [译]特性 on telegram"
        href="https://telegram.me/share/url?text=%5b%e8%af%91%5d%e7%89%b9%e6%80%a7&amp;url=https%3a%2f%2fnote.ftls.xyz%2fpapermod%2fposts%2fpapermod%2fpapermod-features%2f">
        <svg version="1.1" xml:space="preserve" viewBox="2 2 28 28">
            <path
                d="M26.49,29.86H5.5a3.37,3.37,0,0,1-2.47-1,3.35,3.35,0,0,1-1-2.47V5.48A3.36,3.36,0,0,1,3,3,3.37,3.37,0,0,1,5.5,2h21A3.38,3.38,0,0,1,29,3a3.36,3.36,0,0,1,1,2.46V26.37a3.35,3.35,0,0,1-1,2.47A3.38,3.38,0,0,1,26.49,29.86Zm-5.38-6.71a.79.79,0,0,0,.85-.66L24.73,9.24a.55.55,0,0,0-.18-.46.62.62,0,0,0-.41-.17q-.08,0-16.53,6.11a.59.59,0,0,0-.41.59.57.57,0,0,0,.43.52l4,1.24,1.61,4.83a.62.62,0,0,0,.63.43.56.56,0,0,0,.4-.17L16.54,20l4.09,3A.9.9,0,0,0,21.11,23.15ZM13.8,20.71l-1.21-4q8.72-5.55,8.78-5.55c.15,0,.23,0,.23.16a.18.18,0,0,1,0,.06s-2.51,2.3-7.52,6.8Z" />
        </svg>
    </a>
</div>

  </footer>
</article>
    </main><footer class="footer">
    <span>&copy; 2023 <a href="https://note.ftls.xyz/papermod/">PaperMod</a></span>
    <span>&middot;</span>
    <span>Powered by <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a></span>
    <span>&middot;</span>
    <span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)">
    <button class="top-link" id="top-link" type="button" accesskey="g">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
            <path d="M12 6H0l6-6z" />
        </svg>
    </button>
</a>



<script defer src="/papermod/assets/js/highlight.min.b95bacdc39e37a332a9f883b1e78be4abc1fdca2bc1f2641f55e3cd3dabd4d61.js" integrity="sha256-uVus3DnjejMqn4g7Hni&#43;Srwf3KK8HyZB9V4809q9TWE="
    onload="hljs.initHighlightingOnLoad();"></script>
<script>
    window.onload = function () {
        if (localStorage.getItem("menu-scroll-position")) {
            document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position");
        }
    }

    function menu_on_scroll() {
        localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft);
    }

    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener("click", function (e) {
            e.preventDefault();
            var id = this.getAttribute("href").substr(1);
            if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
                document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
                    behavior: "smooth"
                });
            } else {
                document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
            }
            if (id === "top") {
                history.replaceState(null, null, " ");
            } else {
                history.pushState(null, null, `#${id}`);
            }
        });
    });

</script>
<script>
    var mybutton = document.getElementById("top-link");
    window.onscroll = function () {
        if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
            mybutton.style.visibility = "visible";
            mybutton.style.opacity = "1";
        } else {
            mybutton.style.visibility = "hidden";
            mybutton.style.opacity = "0";
        }
    };

</script>
<script>
    document.getElementById("theme-toggle").addEventListener("click", () => {
        if (document.body.className.includes("dark")) {
            document.body.classList.remove('dark');
            localStorage.setItem("pref-theme", 'light');
        } else {
            document.body.classList.add('dark');
            localStorage.setItem("pref-theme", 'dark');
        }
    })

</script>

</body>

</html>
